export const getCronSplitValue = (cronValue: string) => {
  return cronValue.split(" ").filter((a) => a == "0" || !!a);
};

export const arrayToCronString = (arr: any[]) => {
  return arr.filter((a) => a == 0 || a == "0" || !!a).join(" ");
};

export const getTrueHour = (val?: string) => {
  if (!val) {
    return "0";
  }
  const t = String(val).split("/")[0] || "0";
  if (String(Number(t)) == "NaN") {
    return "";
  }
  return t;
};
